﻿<UserControl x:Class="SystemParametersConfiguration.View.SystemParaConfigurationView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0 8 0 0">
            <TextBlock Text="图片服务器:" Width="80"></TextBlock>
            <TextBox Text="{Binding ImageServerUrl}" Width="180"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 8 0 0">
            <TextBlock Text="数据库连接:" Width="80"></TextBlock>
            <TextBox Text="{Binding ConnectionString}" Width="180"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0 8 0 0">
            <TextBlock Text="播放设置:" Width="80"></TextBlock>
            <RadioButton GroupName="DisplayOptions" Content="自动播放" IsChecked="{Binding IsAutoPlayChecked,Mode=TwoWay}" ></RadioButton>
            <RadioButton GroupName="DisplayOptions" Content="手动切换" Margin="5 0 0 0" IsChecked="{Binding IsManuallyPlayChecked,Mode=TwoWay}"></RadioButton>
        </StackPanel>
        <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="0 8 0 0">
            <TextBlock Text="流水线名称:" Width="80"></TextBlock>
            <TextBox Text="{Binding WCNOLine}" Width="180"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="4" Orientation="Horizontal" Margin="0 8 0 0">
            <TextBlock Text="工位名称:" Width="80"></TextBlock>
            <TextBox Text="{Binding StationName}" Width="180"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="5" Orientation="Horizontal" Margin="0 8 0 0">
            <TextBlock Text="COM编号:" Width="80"></TextBlock>
            <TextBox Text="{Binding PortNumber}" Width="180"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="6" Orientation="Horizontal" Margin="0 8 0 0">
            <TextBlock Text="扫描模式:" Width="80"></TextBlock>
            <RadioButton GroupName="ScanOptions" Content="串口扫描" IsChecked="{Binding IsPortScanChecked,Mode=TwoWay}"></RadioButton>
            <RadioButton GroupName="ScanOptions" Content="RFID扫描" Margin="5 0 0 0" IsChecked="{Binding IsRFIDScanChecked,Mode=TwoWay}"></RadioButton>
        </StackPanel>
        <StackPanel Grid.Row="7" Orientation="Horizontal" Margin="0 8 0 0">
            <TextBlock Text="Theme:" Width="80"></TextBlock>
            <telerik:RadComboBox ItemsSource="{Binding Themes}" SelectedItem="{Binding SelectedTheme}" HorizontalAlignment="Stretch" 
                                 Width="180"></telerik:RadComboBox>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="8" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 8 0 0">
            <telerik:RadButton Width="80" Height="22" Content="确定" Margin="0 0 5 0" Command="{Binding SaveCommand,Mode=TwoWay}"></telerik:RadButton>
        </StackPanel>
    </Grid>
</UserControl>
